<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li>
                    <a href="#/sre/dqc/dqc_config">DQC配置列表</a>
                </li>
                <li class="active">数据量检查配置</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
                <!--                <form name="form" ng-keydown="if(event.keyCode==13) return false;" ng-submit="form.$valid&&olapConfigAdd()" novalidate>-->
                <form name="form" novalidate>
                    <div class="form-group"
                        ng-class="{'has-error':form.taskName.$error.required,'has-success':!form.taskName.$error.required}">
                        <label style="padding: 0 0 5px">任务名称</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="taskName" ng-model="vm.p.taskName" required />
                        <!-- <span ng-show="form.groupName.$error.required" class="help-block">请填写执行器分组</span> -->
                        <span ng-show="form.taskName.$error.required" class="help-block">请填写任务名称</span>
                    </div>
                    <div class="form-group"
                        ng-class="{'has-error':form.checkTable.$error.required,'has-success':!form.checkTable.$error.required}">
                        <label style="padding: 0 0 5px">检查表</label>
                        <input type="text" class="form-control" name="checkTable" ng-model="vm.p.checkTable" required />
                        <span ng-show="form.checkTable.$error.required" class="help-block">请填写检查表</span>
                    </div>
                    <div class="form-group"
                        ng-class="{'has-error':form.checkValue.$error.required,'has-success':!form.checkValue.$error.required}">
                        <label style="padding: 0 0 5px">阈值</label>
                        <input type="number" class="form-control" name="checkValue" ng-model="vm.p.checkValue"
                            required />
                        <span ng-show="form.checkValue.$error.required" class="help-block">请填写阈值字段</span>
                    </div>
                    <div class="form-group">
                        <label style="padding: 0 0 5px">负责人</label>
                        <select ng-model="vm.p.ownerId" class="selectpicker" data-live-search="true" name="ownerId"
                            data-size="10">
                            <option ng-repeat="x in vm.listUser" value="{{x.userName}}" data-tokens="{{x.userName}}"
                                my-repeat-finish="repeatFinish()">{{x.userCn}}</option>
                        </select>
                    </div>
                    <div class="form-group"
                        ng-class="{'has-error':form.resolveGroupId.$error.required,'has-success':!form.resolveGroupId.$error.required}">
                        <label style="padding: 0 0 5px">告警支持组id</label>
                        <input type="text" class="form-control" name="resolveGroupId" ng-model="vm.p.resolveGroupId"
                            required />
                        <span ng-show="form.resolveGroupId.$error.required" class="help-block">请填写告警支持组id</span>
                    </div>
                    <div class="form-group"
                        ng-class="{'has-error':form.priority.$error.required,'has-success':!form.priority.$error.required}">
                        <label style="padding: 0 0 5px">优先级</label>
                        <!--                        <input type="text" class="form-control" name="ctiId" ng-model="vm.p.ctiId"/>-->
                        <select required name="priority" ng-model="vm.p.priority" class="form-control"
                            ng-init="vm.p.priority='1'">
                            <option value="1">中</option>
                            <option value="0">高</option>
                        </select>
                        <span ng-show="form.priority.$error.required" class="help-block">请选择任务优先级</span>
                    </div>
                    <div class="form-inline"
                        ng-class="{'has-error':form.checkSql.$error.required,'has-success':!form.checkSql.$error.required}">
                        <input class="btn btn-primary" type="button" value="生成校验SQL" ng-click="generateCheckSql()"
                            id="generateCheckSql" />
                        <textarea class="form-control" name="checkSqlcheckSql" ng-model="vm.p.checkSql"
                            style="width: 82.6%;" required row="4" disabled></textarea>
                        <span ng-show="form.checkSql.$error.required" class="help-block">请生成校验SQL</span>
                    </div>
                    <div class="form-group">
                        <input class="btn btn-primary" ng-class="{'disabled':!form.$valid}" type="button" value="确定"
                            ng-click="form.$valid&&save()" />
                        <a href="#/sre/dqc/dqc_check_task_config_list" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--/.container-->
<!-- <script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput.js"></script> -->
<!-- <script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput-angular.js"></script> -->